<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title></title>
	<include file="Public/header" />
</head>
<body>
<script type="text/javascript">
	var booksEditUrl="{:U('Depot/booksCateSave')}";//更新数据
	var getbooksUrl="{:U('Depot/get_booksCate')}";
	var booksDelUrl="{:U('Depot/booksCateDel')}";
	var booksExamineUrl="{:U('Depot/examineBooksCate')}";
	var booksClearUrl="{:U('Depot/booksCateClear')}";
	var booksUndoUrl="{:U('Depot/booksCateUndo')}";
	var booksInfoUrl="{:U('Depot/booksCateInfo')}";
	var erpId="{:I('id')}";//erp企业对应id
	
	var pushOrderUrl="{:U('Pushsendapi/booksOrderSend')}";//推送接口
	<!-- using('../../../default/js/books.js'); -->
</script>
<script type="text/javascript" src="__PUBLIC__/default/js/books.js"></script>

	<table id="booksDatagrid" toolbar="#books_tb"></table>
	<!-- 添加 -->
	<div id="booksAddDialog" class="easyui-dialog" title="规则添加" style="width:500px;padding:10px 20px"
        closed="true" buttons="#booksAddButtons"  modal="true">
         <form id="booksAddForm" method="post" novalidate>
			<div class="fitem">
                <label>账册编号</label>
                <input name="code" class="easyui-textbox" data-options="required:true,delay:1000,height:30,validType:['length[2,30]']" />
            </div>
            <div class="fitem">
                <label>账册名称</label>
                <input name="name" id="name" type="text"  class="easyui-textbox" data-options="required:true,delay:1000,height:30,validType:['length[1,20]']" />
            </div>
			<div class="fitem">
                <label>商家编码</label>
                <input name="merchant_code" id="merchant_code" type="text"  class="easyui-textbox" data-options="required:true,delay:1000,height:30,validType:['length[1,20]']" />
            </div>
			<div class="fitem">
                <label>快递费率</label>
                <input name="emsfee_rate" id="emsfee_rate" type="text"  class="easyui-textbox" data-options="required:true,delay:1000,height:30,validType:['length[1,20]']" />
            </div>
			<div class="fitem">
                <label>账册类别</label>
                <select class="easyui-combobox books_cate" name="cate" id="books_cate" style="width:70px;height:30px;" data-options="required:true,editable:false,panelHeight:'false',validType:['length[2,30]','selected[]']">
                    <option value="0">未选择</option>
                    <option value="1">一般账册</option>
					<option value="2">跨电账册</option>
                </select>
            </div>

			<div class="fitem">
                <label>ERP企业编码</label>
                <select class="easyui-combobox" name="erp_code" id="books_erpCode" style="width:70px;height:30px;" data-options="required:true,editable:false,panelHeight:'false',validType:['length[2,30]','selected[]']">
                    <volist name="erplist" id="vo">
                        <option value="{$vo['code']}">{$vo['name']}</option>
                    </volist>
                </select>   
            </div>
         </form>
    </div>
    <div id="booksAddButtons">
    	<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-ok" onclick="booksObj.add('{:U('Depot/booksCateAdd')}')" style="width:90px">添加</a>
        <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#booksAddDialog').dialog('close')" style="width:90px">取消</a>
    </div>
    <!-- /添加 -->
	<!-- 编辑 -->
    <div id="booksEditDialog" class="easyui-dialog" style="width:400px;padding:10px 20px"
            closed="true" buttons="#booksEditButtons"  modal="true">
        <form id="booksEditForm" method="post" novalidate>          
            <div class="fitem">
                <label>账册编号</label>
				<input name="id"  type="hidden" />
                <input name="code" class="easyui-textbox" data-options="required:true,disabled:true,delay:1000,height:30" />
            </div>
            <div class="fitem">
                <label>账册名称</label>
                <input name="name" id="name" type="text"  class="easyui-textbox" data-options="required:true,delay:1000,height:30,validType:['length[1,20]']" />
            </div>
			<div class="fitem">
                <label>商家编码</label>
                <input name="merchant_code" id="merchant_code" type="text"  class="easyui-textbox" data-options="required:true,delay:1000,height:30,validType:['length[1,20]']" />
            </div>
			<div class="fitem">
                <label>快递费率</label>
                <input name="emsfee_rate" id="emsfee_rate" type="text"  class="easyui-textbox" data-options="required:true,delay:1000,height:30,validType:['length[1,20]']" />
            </div>
			<div class="fitem">
                <label>账册类别</label>
                <select class="easyui-combobox" name="cate" id="books_cate" style="width:70px;height:30px;" data-options="required:true,editable:false,panelHeight:'false',validType:['length[2,30]','selected[]']">
                    <option value="0">未选择</option>
                    <option value="1">一般账册</option>
					<option value="2">跨电账册</option>	                      
                </select>
            </div>

			<div class="fitem">
                <label>ERP企业编码</label>
                <select class="easyui-combobox" name="erp_code" id="books_erpCode" style="width:70px;height:30px;" data-options="required:true,editable:false,panelHeight:'false',validType:['length[2,30]','selected[]']">
                    <volist name="erplist" id="vo">
                        <option value="{$vo['code']}">{$vo['name']}</option>
                    </volist>
                </select>   
            </div>
        </form>
    </div>
    <div id="booksEditButtons">
        <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-ok" onclick="booksObj.save('{:U('Depot/booksCateSave')}')" style="width:90px">更新</a>
        <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:
    $('#booksEditDialog').dialog('close')" style="width:90px">取消</a>
    </div>
    <!-- /编辑 -->
    <!-- 搜索栏 -->
    <div id="books_tb">
        <form id="booksSearchForm" method="post" novalidate>
             <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon icon-all" plain="true" onclick="booksObj.showAll()">全部</a>     
			 账册编号:<input class="easyui-textbox" name="code" style="width:150px;height:30px;"> 
			 账册名称:<input class="easyui-textbox" name="name" style="width:150px;height:30px;"> 
			 仓库企业名称:<input class="easyui-textbox" name="erp_name" style="width:150px;height:30px;"> 
			 账册类别:<select class="easyui-combobox" name="cate"  style="width:70px;height:30px;">
                 <option value="0">未选择</option>
                 <option value="1">一般账册</option>
				 <option value="2">跨电账册</option>	                      
             </select>

			<a href="#" class="easyui-linkbutton searchBar" iconCls="icon-search" style="height:30px;">搜索</a>
        </form>
		<a href="javascript:void(0)" onclick="booksObj.infoBar()" class="easyui-linkbutton" data-options="iconCls:'icon-information',plain:true">详情</a>
		<a href="javascript:void(0)" onclick="booksObj.addBar()" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true">添加</a>
        <a href="javascript:void(0)" onclick="booksObj.editBar()" class="easyui-linkbutton" data-options="iconCls:'icon-edit',plain:true">修改</a>
        <a href="javascript:void(0)" onclick="booksObj.removeBar()" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true">删除</a>
		<a href="javascript:void(0)" onclick="booksObj.reloadBar()" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true">刷新</a>
		<a href="javascript:void(0)" onclick="booksObj.saveBar()" class="easyui-linkbutton" data-options="iconCls:'icon-save',plain:true">保存</a>
        <a href="javascript:void(0)" onclick="booksObj.examineBar(1)" class="easyui-linkbutton" data-options="iconCls:'icon-key',plain:true">审核通过</a>
		<a href="javascript:void(0)" onclick="booksObj.examineBar(2)" class="easyui-linkbutton" data-options="iconCls:'icon-key_delete',plain:true">审核不通过</a>
		<a href="javascript:void(0)" class="easyui-menubutton" data-options="menu:'#books_mm1',iconCls:'icon-recycle'">回收站</a>
		<div id="books_mm1" style="width:150px;">
			<div onclick="booksObj.recycle()">查看</div>
			<div onclick="booksObj.undoBar()" data-options="iconCls:'icon-undo'">恢复</div>
			<div onclick="booksObj.clearBar()" data-options="iconCls:'icon-remove'">删除</div>
		</div>
		<!-- <a href="javascript:void(0)" onclick="booksObj.pushBar()" class="easyui-linkbutton" data-options="iconCls:'icon-world_go',plain:true">推送</a> -->
    </div>
    <!-- /搜索栏 -->
</body>